package com.example.xf.Service.Impl;

import com.example.xf.FeClient.HouseClient;
import com.example.xf.FeClient.PurchaseClient;
import com.example.xf.Service.purchaseService;
import com.github.pagehelper.PageInfo;
import dto.Dto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.*;

import java.util.List;

@Service
public class PurchaseServiceImpl implements purchaseService{
    @Autowired
    private PurchaseClient purchaseClient;
    @Autowired
    private HouseClient houseClient;

    @Override

    public Dto<Integer> addPo(Purchase purchase) {

        return purchaseClient.addPo(purchase);
    }

    @Override
    public Dto<Integer> delePo(String  id) {
        return purchaseClient.delePo(id);
    }

    @Override
    public Dto<Integer> updaPo(PurchaseOrder purchaseOrder) {
        return purchaseClient.updaPo(purchaseOrder);
    }



    @Override
    public Dto<PageInfo<PurchaseOrder>> ListPo(ListPo listPo) {
        return purchaseClient.ListPo(listPo);

    }

    @Override
    public Dto<Integer> contPo() {
        return purchaseClient.contPo();
    }

    @Override
    public Dto<List<String>> showPid() {
        return purchaseClient.showPid();
    }

    @Override
    public Dto<PurchaseOrder> show1Po(String pid) {
        return purchaseClient.show1Po(pid);
    }

    @Override
    public Dto<Integer> updaPo2(Xgzt xgzt) {
        return purchaseClient.updaPo2(xgzt);
    }


    @Override
    public Dto<Integer> addPl(List<PurchaseList> list) {

        return purchaseClient.addPl(list);
    }

    @Override
    public Dto<Integer> addPl2(List<PurchaseList> list) {
        return purchaseClient.addPl2(list);
    }

    @Override
    public Dto<List> listPl(String pid) {
        return purchaseClient.listPl(pid);
    }

    @Override
    public Dto<Integer> delePl(String id) {
        return purchaseClient.delePl(id);
    }

    @Override
    public Dto<Integer> updaPl(Xgth xgth) {
        return purchaseClient.updaPl(xgth);
    }


    /**
     * @param
     * @return
     */
    @Override
    public Dto<Integer> addPr(Pr pr) {
        return purchaseClient.addPr(pr);
    }

    @Override
    public Dto<Integer> delePr(String id) {
        return purchaseClient.delePr(id);
    }



    @Override
    public Dto<PageInfo<PurchaseReturn>> listPr(ListPo listPo) {
        return purchaseClient.listPr(listPo);
    }

    @Override
    public Dto<Integer> contPr() {
        return purchaseClient.contPr();
    }

    @Override
    public Dto<PurchaseReturn> showPr(String code) {
        return purchaseClient.showPr(code);
    }

    @Override
    public Dto<Integer> updaPr(Xgzt xgzt) {
        return purchaseClient.updaPr(xgzt);
    }


    /**
     * @param supplier
     * 供应商模块
     *
     * @return
     */
    @Override
    public Dto<Integer> addSp(Supplier supplier) {
        return purchaseClient.addSp(supplier);
    }

    @Override
    public Dto<Integer> deleSp(int id) {
        return purchaseClient.deleSp(id);
    }

    @Override
    public Dto<Integer> updaSp(Supplier supplier) {
        return purchaseClient.updaSp(supplier);
    }

    @Override
    public Dto<PageInfo<Supplier>> listSp(String name, int pageNum, int pageSize) {
        return purchaseClient.listSp(name,pageNum,pageSize);
    }

    @Override
    public Dto<Integer> contSp() {
        return purchaseClient.contSp();
    }

    @Override
    public Dto<List<String>> nameSp() {
        return purchaseClient.nameSp();
    }

    @Override
    public Dto<Supplier> showSp(Integer id) {
        return purchaseClient.showSp(id);
    }

    @Override
    public Dto<Supplier> showSp2(String name) {
        return purchaseClient.showSp2(name);
    }


    /**
     * @param house_order
     * 仓库模块
     * @return
     */
    @Override
    public Dto<Integer> addHo(House_order house_order) {
        return houseClient.addHo(house_order);
    }

    @Override
    public Dto<Integer> deleHo(String id) {
        return houseClient.deleHo(id);
    }

    @Override
    public Dto<PageInfo<House_order>> listHo(ListHo listHo) {
        return houseClient.listHo(listHo);
    }

    @Override
    public Dto<Integer> contHo() {
        return houseClient.contHo();
    }


}
